package com.wanxi.user.mapper;

import com.wanxi.user.domain.dto.DelShoppingCartDto;
import com.wanxi.user.domain.dto.ShoppingCartDto;
import com.wanxi.user.domain.entity.ShoppingCart;
import com.wanxi.user.domain.query.ShoppingQuery;
import com.wanxi.user.entity.ProductNumber;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @Author:Iny
 * @Data：2022/1/6 11:16
 */
@Mapper
public interface ShoppingCartMapper {

    int addProduct(ShoppingCartDto productCartDto);

    ShoppingCart findByUserIdAndSkuId(ShoppingQuery shoppingQuery);

    int updateNumber(ProductNumber productNumber);

    int delCartProduct(DelShoppingCartDto delShoppingCartDto);

    int delByUserId(int userId);

    List<ShoppingCart> findByUserId(int userId);
}
